package day18;

import java.util.Scanner;

//统计每个月兔子的总数(类似fibonacci)
public class oj1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int fn = 0;
        int fn1 = 1;
        int fn2 = 1;
        if(n == 1) {
            fn = 1;
        }
        if(n == 2) {
            fn = 1;
        }
        if(n > 2) {
            for(int i = 3; i <= n; i++) {
                fn = fn1 + fn2;
                fn1 = fn2;
                fn2 = fn;
            }
        }
        System.out.println(fn);
    }
}
